<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Linguistics::LanguageProxyClass</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Linguistics::LanguageProxyClass</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/lib/linguistics_rb.html">
                lib/linguistics.rb
                </a>
        &nbsp;(<a href="http://deveiate.org/projects/Linguistics/browser/trunk/lib/linguistics.rb"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
A class which is inherited from by proxies for classes being extended with
one or more linguistic interfaces. It provides on-the-fly creation of
linguistic methods when the <tt>:installProxy</tt> option is passed to the
call to <a href="../Linguistics.html#M000009">Linguistics#use</a>.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000065">inspect</a>&nbsp;&nbsp;
      <a href="#M000064">method_missing</a>&nbsp;&nbsp;
      <a href="#M000062">new</a>&nbsp;&nbsp;
      <a href="#M000063">respond_to?</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">langmod</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000062" class="method-detail">
        <a name="M000062"></a>

        <div class="method-heading">
          <a href="#M000062" class="method-signature">
          <span class="method-name">new</span><span class="method-args">( receiver )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Create a <a href="LanguageProxyClass.html#M000062">new</a> LanguageProxy
for the given <tt>receiver</tt>.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000062-source">
<pre>
    <span class="ruby-comment cmt"># File lib/linguistics.rb, line 75</span>
75:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">receiver</span> )
76:             <span class="ruby-ivar">@receiver</span> = <span class="ruby-identifier">receiver</span>
77:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000065" class="method-detail">
        <a name="M000065"></a>

        <div class="method-heading">
          <a href="#M000065" class="method-signature">
          <span class="method-name">inspect</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns a human-readable representation of the languageProxy for debugging,
logging, etc.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000065-source">
<pre>
     <span class="ruby-comment cmt"># File lib/linguistics.rb, line 107</span>
107:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
108:             <span class="ruby-value str">&quot;&lt;%s languageProxy for %s object %s&gt;&quot;</span> <span class="ruby-operator">%</span> [
109:                 <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">langmod</span>.<span class="ruby-identifier">language</span>,
110:                 <span class="ruby-ivar">@receiver</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>,
111:                 <span class="ruby-ivar">@receiver</span>.<span class="ruby-identifier">inspect</span>,
112:             ]
113:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000064" class="method-detail">
        <a name="M000064"></a>

        <div class="method-heading">
          <a href="#M000064" class="method-signature">
          <span class="method-name">method_missing</span><span class="method-args">( sym, *args, &amp;block )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Autoload linguistic methods defined in the module this object&#8216;s class
uses for inflection.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000064-source">
<pre>
     <span class="ruby-comment cmt"># File lib/linguistics.rb, line 92</span>
 92:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>( <span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span> )
 93:             <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">super</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">langmod</span>.<span class="ruby-identifier">respond_to?</span>( <span class="ruby-identifier">sym</span> )
 94: 
 95:             <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">module_eval</span> <span class="ruby-node">%{
 96:                 def #{sym}( *args, &amp;block )
 97:                     self.class.langmod.#{sym}( @receiver, *args, &amp;block )
 98:                 end
 99:             }</span>, <span class="ruby-value str">&quot;{Autoloaded: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-keyword kw">__FILE__</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;}&quot;</span>, <span class="ruby-keyword kw">__LINE__</span>
100: 
101:             <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">method</span>( <span class="ruby-identifier">sym</span> ).<span class="ruby-identifier">call</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span> )
102:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000063" class="method-detail">
        <a name="M000063"></a>

        <div class="method-heading">
          <a href="#M000063" class="method-signature">
          <span class="method-name">respond_to?</span><span class="method-args">( sym )</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Overloaded to take into account the proxy method.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000063-source">
<pre>
    <span class="ruby-comment cmt"># File lib/linguistics.rb, line 85</span>
85:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">respond_to?</span>( <span class="ruby-identifier">sym</span> )
86:             <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">langmod</span>.<span class="ruby-identifier">respond_to?</span>( <span class="ruby-identifier">sym</span> ) <span class="ruby-operator">||</span> <span class="ruby-keyword kw">super</span>
87:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>